:root {
    --van-overlay-z-index: 1;
    --van-overlay-background: rgba(0, 0, 0, .7)
}

.van-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--van-overlay-z-index);
    width: 100%;
    height: 100%;
    background: var(--van-overlay-background)
}

:root {
    --van-popup-background: var(--van-background-2);
    --van-popup-transition: transform var(--van-duration-base);
    --van-popup-round-radius: 16px;
    --van-popup-close-icon-size: 22px;
    --van-popup-close-icon-color: var(--van-gray-5);
    --van-popup-close-icon-margin: 16px;
    --van-popup-close-icon-z-index: 1
}

.van-overflow-hidden {
    overflow: hidden !important
}

.van-popup {
    position: fixed;
    max-height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    background: var(--van-popup-background);
    transition: var(--van-popup-transition);
    -webkit-overflow-scrolling: touch
}

.van-popup--center {
    top: 50%;
    left: 0;
    right: 0;
    width: fit-content;
    max-width: calc(100vw - var(--van-padding-md) * 2);
    margin: 0 auto;
    transform: translateY(-50%)
}

.van-popup--center.van-popup--round {
    border-radius: var(--van-popup-round-radius)
}

.van-popup--top {
    top: 0;
    left: 0;
    width: 100%
}

.van-popup--top.van-popup--round {
    border-radius: 0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)
}

.van-popup--right {
    top: 50%;
    right: 0;
    transform: translate3d(0, -50%, 0)
}

.van-popup--right.van-popup--round {
    border-radius: var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)
}

.van-popup--bottom {
    bottom: 0;
    left: 0;
    width: 100%
}

.van-popup--bottom.van-popup--round {
    border-radius: var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0
}

.van-popup--left {
    top: 50%;
    left: 0;
    transform: translate3d(0, -50%, 0)
}

.van-popup--left.van-popup--round {
    border-radius: 0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0
}

.van-popup-slide-top-enter-active, .van-popup-slide-left-enter-active, .van-popup-slide-right-enter-active, .van-popup-slide-bottom-enter-active {
    transition-timing-function: var(--van-ease-out)
}

.van-popup-slide-top-leave-active, .van-popup-slide-left-leave-active, .van-popup-slide-right-leave-active, .van-popup-slide-bottom-leave-active {
    transition-timing-function: var(--van-ease-in)
}

.van-popup-slide-top-enter-from, .van-popup-slide-top-leave-active {
    transform: translate3d(0, -100%, 0)
}

.van-popup-slide-right-enter-from, .van-popup-slide-right-leave-active {
    transform: translate3d(100%, -50%, 0)
}

.van-popup-slide-bottom-enter-from, .van-popup-slide-bottom-leave-active {
    transform: translate3d(0, 100%, 0)
}

.van-popup-slide-left-enter-from, .van-popup-slide-left-leave-active {
    transform: translate3d(-100%, -50%, 0)
}

.van-popup__close-icon {
    position: absolute;
    z-index: var(--van-popup-close-icon-z-index);
    color: var(--van-popup-close-icon-color);
    font-size: var(--van-popup-close-icon-size)
}

.van-popup__close-icon--top-left {
    top: var(--van-popup-close-icon-margin);
    left: var(--van-popup-close-icon-margin)
}

.van-popup__close-icon--top-right {
    top: var(--van-popup-close-icon-margin);
    right: var(--van-popup-close-icon-margin)
}

.van-popup__close-icon--bottom-left {
    bottom: var(--van-popup-close-icon-margin);
    left: var(--van-popup-close-icon-margin)
}

.van-popup__close-icon--bottom-right {
    right: var(--van-popup-close-icon-margin);
    bottom: var(--van-popup-close-icon-margin)
}

:root {
    --van-dialog-width: 320px;
    --van-dialog-small-screen-width: 90%;
    --van-dialog-font-size: var(--van-font-size-lg);
    --van-dialog-transition: var(--van-duration-base);
    --van-dialog-radius: 16px;
    --van-dialog-background: var(--van-background-2);
    --van-dialog-header-font-weight: var(--van-font-bold);
    --van-dialog-header-line-height: 24px;
    --van-dialog-header-padding-top: 26px;
    --van-dialog-header-isolated-padding: var(--van-padding-lg) 0;
    --van-dialog-message-padding: var(--van-padding-lg);
    --van-dialog-message-font-size: var(--van-font-size-md);
    --van-dialog-message-line-height: var(--van-line-height-md);
    --van-dialog-message-max-height: 60vh;
    --van-dialog-has-title-message-text-color: var(--van-gray-7);
    --van-dialog-has-title-message-padding-top: var(--van-padding-xs);
    --van-dialog-button-height: 48px;
    --van-dialog-round-button-height: 36px;
    --van-dialog-confirm-button-text-color: var(--van-primary-color)
}

.van-dialog {
    top: 45%;
    width: var(--van-dialog-width);
    overflow: hidden;
    font-size: var(--van-dialog-font-size);
    background: var(--van-dialog-background);
    border-radius: var(--van-dialog-radius);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: var(--van-dialog-transition);
    transition-property: transform, opacity
}

@media (max-width: 321px) {
    .van-dialog {
        width: var(--van-dialog-small-screen-width)
    }
}

.van-dialog__header {
    color: var(--van-text-color);
    padding-top: var(--van-dialog-header-padding-top);
    font-weight: var(--van-dialog-header-font-weight);
    line-height: var(--van-dialog-header-line-height);
    text-align: center
}

.van-dialog__header--isolated {
    padding: var(--van-dialog-header-isolated-padding)
}

.van-dialog__content--isolated {
    display: flex;
    align-items: center;
    min-height: 104px
}

.van-dialog__message {
    color: var(--van-text-color);
    flex: 1;
    max-height: var(--van-dialog-message-max-height);
    padding: 26px var(--van-dialog-message-padding);
    overflow-y: auto;
    font-size: var(--van-dialog-message-font-size);
    line-height: var(--van-dialog-message-line-height);
    white-space: pre-wrap;
    text-align: center;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch
}

.van-dialog__message--has-title {
    padding-top: var(--van-dialog-has-title-message-padding-top);
    color: var(--van-dialog-has-title-message-text-color)
}

.van-dialog__message--left {
    text-align: left
}

.van-dialog__message--right {
    text-align: right
}

.van-dialog__message--justify {
    text-align: justify
}

.van-dialog__footer {
    display: flex;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none
}

.van-dialog__confirm, .van-dialog__cancel {
    flex: 1;
    height: var(--van-dialog-button-height);
    margin: 0;
    border: 0;
    border-radius: 0
}

.van-dialog__confirm, .van-dialog__confirm:active {
    color: var(--van-dialog-confirm-button-text-color)
}

.van-dialog--round-button .van-dialog__footer {
    position: relative;
    height: auto;
    padding: var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)
}

.van-dialog--round-button .van-dialog__message {
    padding-bottom: var(--van-padding-md);
    color: var(--van-text-color)
}

.van-dialog--round-button .van-dialog__confirm, .van-dialog--round-button .van-dialog__cancel {
    height: var(--van-dialog-round-button-height)
}

.van-dialog--round-button .van-dialog__confirm {
    color: var(--van-white)
}

.van-dialog--round-button .van-action-bar-button--first {
    border-top-left-radius: var(--van-radius-max);
    border-bottom-left-radius: var(--van-radius-max)
}

.van-dialog--round-button .van-action-bar-button--last {
    border-top-right-radius: var(--van-radius-max);
    border-bottom-right-radius: var(--van-radius-max)
}

.van-dialog-bounce-enter-from {
    transform: translate3d(0, -50%, 0) scale(.7);
    opacity: 0
}

.van-dialog-bounce-leave-active {
    transform: translate3d(0, -50%, 0) scale(.9);
    opacity: 0
}

/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */
.van-popup.van-toast{
    background: var(--van-toast-background) !important;
    box-sizing: content-box !important;
    /* 下面3条css,影响不大 */
    transition: all var(--van-duration-fast) !important;
    width: var(--van-toast-default-width) !important;
    max-width: var(--van-toast-max-width) !important;
}
.van-popup.van-toast .van-toast__icon{
    font-size: var(--van-toast-icon-size) !important;
}
